﻿<?xml version="1.0" encoding="utf-8" ?>
<Feature id="Survey Feature" name="Survey Service Feature">
    <Dependencies>
        <Dependency type="feature">ArticlesFeature.xml</Dependency>
      <Dependency type="feature">ArticlesAdminFeature.xml</Dependency>
        <Dependency type="feature">UserLoginFeature.xml</Dependency>
    </Dependencies>
    <BusinessRules>
      <BusinessRule name="getCompanySurvey" security="disabled">
        <LocalClass name="Survey.SurveyBizRule,ScsCore" />
      </BusinessRule>
      <BusinessRule name="GetUserSurveyResponses" security="disabled">
        <LocalClass name="Survey.SurveyBizRule,ScsCore" />
      </BusinessRule>
      <BusinessRule name="getUserFormData" security="disabled">
        <LocalClass name="Survey.SurveyBizRule,ScsCore" />
      </BusinessRule>
      <BusinessRule name="getSurveySettings" security="disabled">
        <LocalClass name="Survey.SurveyBizRule,ScsCore" />
      </BusinessRule>
      <BusinessRule name="postExtendsUpdateSurveySettings" security="disabled" postExtends="updateArticle">
        <LocalClass name="Survey.SurveyBizRule,ScsCore" />
      </BusinessRule>
      <BusinessRule name="updateUserSurveyFormData" security="disabled" >
        <LocalClass name="Survey.SurveyBizRule,ScsCore" />
      </BusinessRule>
    </BusinessRules>

  <BusinessObjects>
      <BusinessObject type="MetaType" key="id">
        <Field name="id" type="String" />
        <Field name="name" type="String" />
      </BusinessObject>
    
      <BusinessObject injects="Article">
        <Field name="minAnswer" type="Integer" />
        <Field name="maxAnswer" type="Integer" />
        <Field name="created" type="Date" />
        <Field name="modified" type="Date" />
        <Method name="required" language="jscript.NET">
          <![CDATA[return (self.getItem("minAnswer") > 0 )]]>
        </Method>
      </BusinessObject>
    
    <BusinessObject injects="ArticleForm">
      <Field name="type" type="String" />
      <Field name="selectedCount" type="Integer" />
    </BusinessObject>
    
    <BusinessObject injects="Company">
      <Field name="masterClientKey" type="Guid" />
      <Method name="masterClientName" language="jscript.NET">
        <Get>
          <![CDATA[return self.getItem("shortName");]]>
        </Get>
        <Set>
          <![CDATA[self.putValidated("shortName", val);]]>
        </Set>
      </Method>
      <Field name="Created" type="Date" />
      <Field name="Modified" type="Date" />
    </BusinessObject>
    
    <BusinessObject injects="User">
      <Field name="externalClentId" type="String" />
      <Field name="masterClientName" type="String" />
      
      <Field name="backDoorQuestion" type="String" />
      <Field name="backDoorAnswer" type="String" />
      <Field name="Created" type="Date" />
      <Field name="Modified" type="Date" />
    </BusinessObject>
  </BusinessObjects>

  <ApplicationData>
    <Entry name="SurveyMetaTypes" type="IBizObjList.MetaType">
      <ArticleTypes>
        <ArticleType id="-Required" name="Multiple" />
        <ArticleType id="-Optional" name="Optional" />
      </ArticleTypes>
    </Entry>
  </ApplicationData>
  <ClassFactory id="BizProcs">
    <Class type="Survey.Gui.SurveyBizProc,ScsCore" name="SurveyBP"/>
    <Class type="Survey.Gui.SurveyUserResultBizProc,ScsCore" name="surveyUserResultBP"/>
    

  </ClassFactory>
      
    

    
</Feature>
